package bird.stack.linkedlist_stack;

import bird.stack.linkedlist_stack.LinkedListStack;

/**
 * @author sijunqiang
 * @data 2021/5/24 23:04
 * @description: 链表栈的测试
 */
public class Main {

    public static void main(String[] args) {
         LinkedListStack<Integer> linkedListStack = new LinkedListStack<>();

        //Test push element to linkedListStack
        for (int i = 0; i < 10; i++) {
            linkedListStack.push(i);
            System.out.println(linkedListStack);
        }
        //Test pop element
        Integer pop = linkedListStack.pop();
        System.out.println(linkedListStack);

        Integer peek = linkedListStack.peek();
        System.out.println("peek = " + peek);
    }
}
